
import request from '@/utils/request';


export function startAiJob (spiderId, postData) {
    // spiderId like: POST_LIST, POST_IMAGES, POST_ROOMS, POST_META, POST_TYPES, POST_EVENTS, HOUSE_LIST ...
    if(postData == null){
        postData = {};
    }
    postData.spider_id  = spiderId;
    return request({
        url: '/admin6/ai/start',
        method: 'POST',
        data: postData,
    })
}

export function getAiStatus (spiderId) {
    // spiderId like: POST_LIST, POST_IMAGES, POST_ROOMS, POST_META, POST_TYPES, POST_EVENTS, HOUSE_LIST ...
    return request({
        url: '/admin6/ai/status',
        method: 'POST',
        data: {spider_id: spiderId},
    })
}
